module.exports = {
    title: 'Discuz! Q 官方文档',
    base: '/docs-v1/',
    evergreen: true,
    themeConfig: {
        lastUpdated: '最后更新',
        editLinks: false,
        smoothScroll: true,
        nav: [
            { text: '官网', link: 'https://discuz.com' },
            { text: 'REST API v1', link: 'https://discuz.com/api-docs/v1' },
        ],
        sidebar: {
            '/': [{
                    title: '前言',
                    collapsable: false,
                    children: ['/release_notes', '/dev', '/contact'],
                },
                {
                    title: '入门指南',
                    collapsable: false,
                    children: ['/install', '/web_dev', '/uniapp_hbuilderx', '/config', '/upgrade', 'convert', '/docs', '/install_faq'],
                },
                {
                    title: '功能说明',
                    collapsable: false,
                    children: ['/dirs', '/api'],
                },
            ],
        },
    },
    head: [
        [
            'script',
            {},
            `
      document.addEventListener("DOMContentLoaded", function(){
        console.log("ready");
        var isChrome = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor);
        if (window.location.hash && isChrome) {
            setTimeout(function () {
                var hash = window.location.hash;
                var element_to_scroll_to = document.getElementById(decodeURI(hash.substr(1)));
                element_to_scroll_to.scrollIntoView();
            }, 300);
        }
      });
`,
        ],
    ],
    plugins: [
        [
            'copy-code',
            {
                copyMessage: '已复制到剪贴板。', // default is 'Copy successfully and then paste it for use.'
                duration: 1000, // prompt message display time.
            },
        ],
    ],
};
